package cn.abcsys.cloud.devops.runtime.entity;

import java.util.Date;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.DateSerializer;
/**
 * 集群
 * @author mayunhao
 * @date 2017-06-16
 */
public class Cluster {
	/*
	 * 集群的唯一标识符
	 */
	private Integer clusterId;
	/*
	 * 集群名称，可以给默认名称，规则是用户+集群+ID
	 */
	private String clusterName;
	/*
	 * 集群所在主机ID,最多有3个，通过;区分，适用高可用场景
	 */
	private String clusterHostId;
	/*
	 * 集群类型，如 0:k8s, 1:swarm, 2:mesos
	 */
	private Byte clusterType;
	/*
	 * 集群关联仓库
	 */
	private Integer clusterRegistryId;
	/*
	 * 集群状态, 如 0:不可用（集群中无Host资源），1:可用
	 */
	private Byte clusterStatus;
	/*
	 * 集群端口
	 */
	private String clusterPort;
	/*
	 * 描述信息
	 */
	private String clusterDesc;
	/*
	 * 创建时间
	 */
	@JsonSerialize(using = DateSerializer.class)
	private Date clusterCreatetime;
	/*
	 * 创建人
	 */
	private Integer userId;
	/*
	 * '0:资源共享(CPU按照1：3比例放大，MEM按照默认1GB计算)   1：资源独占
	 */
	private Byte clusterResType;
	/*
	 * CPU
	 */
	private Integer clusterTotalCpu;
	/*
	 * 内存
	 */
	private Integer clusterTotalMem;
	/*
	 * CPU
	 */
	private Integer clusterFreeCpu;
	/*
	 * 内存
	 */
	private Integer clusterFreeMem;
	/*
	 * 高可用虚拟Ip
	 */
	private String serviceIp;
	/*
	 * 启用高可用
	 */
	private Byte haEnable;
	private Integer envId;
	public Integer getClusterId() {
		return clusterId;
	}

	public void setClusterId(Integer clusterId) {
		this.clusterId = clusterId;
	}

	public String getClusterName() {
		return clusterName;
	}

	public void setClusterName(String clusterName) {
		this.clusterName = clusterName == null ? null : clusterName.trim();
	}

	public Byte getClusterType() {
		return clusterType;
	}

	public void setClusterType(Byte clusterType) {
		this.clusterType = clusterType;
	}

	public Byte getClusterStatus() {
		return clusterStatus;
	}

	public void setClusterStatus(Byte clusterStatus) {
		this.clusterStatus = clusterStatus;
	}

	public String getClusterPort() {
		return clusterPort;
	}

	public void setClusterPort(String clusterPort) {
		this.clusterPort = clusterPort == null ? null : clusterPort.trim();
	}

	public String getClusterHostId() {
		return clusterHostId;
	}

	public void setClusterHostId(String clusterHostId) {
		this.clusterHostId = clusterHostId;
	}

	public String getClusterDesc() {
		return clusterDesc;
	}

	public void setClusterDesc(String clusterDesc) {
		this.clusterDesc = clusterDesc;
	}

	public Date getClusterCreatetime() {
		return clusterCreatetime;
	}

	public void setClusterCreatetime(Date clusterCreatetime) {
		this.clusterCreatetime = clusterCreatetime;
	}
	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Byte getClusterResType() {
		return clusterResType;
	}

	public void setClusterResType(Byte clusterResType) {
		this.clusterResType = clusterResType;
	}

	public Integer getClusterTotalCpu() {
		return clusterTotalCpu;
	}

	public void setClusterTotalCpu(Integer clusterTotalCpu) {
		this.clusterTotalCpu = clusterTotalCpu;
	}

	public Integer getClusterTotalMem() {
		return clusterTotalMem;
	}

	public void setClusterTotalMem(Integer clusterTotalMem) {
		this.clusterTotalMem = clusterTotalMem;
	}

	public Integer getClusterFreeCpu() {
		return clusterFreeCpu;
	}

	public void setClusterFreeCpu(Integer clusterFreeCpu) {
		this.clusterFreeCpu = clusterFreeCpu;
	}

	public Integer getClusterFreeMem() {
		return clusterFreeMem;
	}

	public void setClusterFreeMem(Integer clusterFreeMem) {
		this.clusterFreeMem = clusterFreeMem;
	}

	public Integer getClusterRegistryId() {
		return clusterRegistryId;
	}

	public void setClusterRegistryId(Integer clusterRegistryId) {
		this.clusterRegistryId = clusterRegistryId;
	}

	public String getServiceIp() {
		return serviceIp;
	}

	public void setServiceIp(String serviceIp) {
		this.serviceIp = serviceIp;
	}

	public Byte getHaEnable() {
		return haEnable;
	}

	public void setHaEnable(Byte haEnable) {
		this.haEnable = haEnable;
	}

	public Integer getEnvId() {
		return envId;
	}

	public void setEnvId(Integer envId) {
		this.envId = envId;
	}
}